package com.service;

import com.mypg.News;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.List;

public interface NewsService {
    List<News> selectAllNews();
    News selectNewsByNews_id(int news_id);
    List<News> selectNewsFor_news_table_jsp(@Param("news_class")String news_class, @Param("time_start") Timestamp time_start,
                                            @Param("time_end")Timestamp time_end, @Param("start_row")int start_row,
                                            @Param("page_nums")int page_nums);
    List<News> selectRelativeNews(@Param("news_class")String news_class,@Param("news_id")int news_id);
    int selectNews_count_For_news_table_jsp(@Param("news_class")String news_class, @Param("time_start")Timestamp time_start,
                                            @Param("time_end")Timestamp time_end);
    int selectNews_count();

    void insertNews(News news);

    void deleteNewsByNews_id(int news_id);

    void updateNewsByNews_id(News news);
    void updateNews_imgByNews_id(String news_img,int news_id);
    void updateNews_readByNews_id(int news_id);
}
